

import { createApp } from 'vue'
import { createPinia } from 'pinia'

// pinia持久化
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

//icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


// dark css
import 'element-plus/theme-chalk/dark/css-vars.css'
import '@/static/main.css'


import App from './App.vue'
import router from './router'

const app = createApp(App)

app.use(ElementPlus)

//icon
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
// pinia和Pinia持久化

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)


app.use(pinia)
app.use(router)

app.mount('#app')
